from page.home_page_lcy import Home_Page
import unittest


class SwitchTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.home = Home_Page(appPackage='com.nearme.gamecenter', appActivity='.ui.activity.SplashActivity')

    def test_01_switch(self):
        text1 = self.home.switch_app_name()
        self.home.switch_click()
        text2 = self.home.switch_app_name()
        self.assertNotEqual(text1, text2, msg="断言点击切换成功")

    @classmethod
    def tearDownClass(cls) -> None:
        cls.home.quit()


if __name__ == '__main__':
    unittest.main(verbosity=2)
